package memento;

/**
 * @Author shenhan
 * @Date: 2020/4/10 23:07
 * @Description:
 */
class Originator {
    private String state;

    String getState() {
        return state;
    }

    void setState(String state) {
        this.state = state;
    }
    Memento saveStateMemnto() {
        return new Memento(state);
    }

    void getStateFromMemento(Memento memento) {
        state = memento.getState();
    }
}
